﻿<%@ Page Title="" Language="C#" ValidateRequest="true" MasterPageFile="~/Template/Detail.master"
    AutoEventWireup="true" CodeBehind="Three2Detail.aspx.cs" Inherits="MaluJg.web.Three.Three2Detail" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style>
        body p span
        {
            font-family: 仿宋_GB2312;
            font-size: 14.0pt;
        }
    </style>

    <script>
        $(document).ready(function() {
            if ($("#<%=tbInstances.ClientID %>").val() == '') {
                addNew2();
                addNew2();
                addNew2();
                addNew2();
                addNew2();
                addNew2();
            }
            else {
                init();
            }
        });
        function addNew2() {
            var last = $("#tbl >tbody> tr[name='template1']").last();
            var max = 1;
            if (last.html() != null) {

                max = parseInt(last.get(0).childNodes[1].innerHTML) + 1;
            }

            $("#tbl >tbody>tr:last").after($("#template1>tbody").html().replace(/t0/ig, max));
        }
        function deleteTr(obj) {
            $(obj).parent().parent().remove();
        }
        function init() {
            var arr = $("#<%=tbInstances.ClientID %>").val().split(';');

            for (var i = 0; i < arr.length; i++) {
                addNew2();
                var arrValue = arr[i].split('|');
                for (var j = 0; j < arrValue.length; j++) {
                    var type = $("#" + (i + 1).toString() + (j + 2).toString()).get(0).type;
                    if (type.toLowerCase() == 'text') {

                        $("#" + (i + 1).toString() + (j + 2).toString()).val(arrValue[j].replace(/@1/g, ';').replace(/@2/g, '|'));
                    }
                    else if (type.toLowerCase() == 'checkbox') {
                        $("#" + (i + 1).toString() + (j + 2).toString()).attr("checked", (arrValue[j] == 'True' ? true : false));
                    }
                }
            }
        }
        function check() {
            if (window.confirm('确认提交?')) {
                var tmp = '';
                $("#tbl >tbody>tr[name='template1']").each(function() {
                    var trObj = $(this).get(0);
                    tmp += ';' + trObj.childNodes[2].childNodes[0].value.replace(/;/g, '@1').replace(/\|/g, '@2') + '|';
                    tmp += trObj.childNodes[3].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[4].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[5].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[6].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[7].childNodes[0].value.replace(/;/g, '@1').replace(/\|/g, '@2') + '|';
                    tmp += trObj.childNodes[8].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[9].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[10].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[11].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[12].childNodes[0].checked + '|';
                    tmp += trObj.childNodes[13].childNodes[0].value.replace(/;/g, '@1').replace(/\|/g, '@2') + '|';
                    tmp += trObj.childNodes[14].childNodes[0].value.replace(/;/g, '@1').replace(/\|/g, '@2');
                });

                $("#<%=tbInstances.ClientID %>").val(tmp);
                return true;
            }
            else
                return false;

        }
    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ListToolBarPlaceHolder" runat="server">
    <asp:TextBox runat="server" ID="tbInstances" Rows="6" TextMode="MultiLine" Width="500"
        Style="display: none;"></asp:TextBox>
    <table cellspacing="2" cellpadding="0" border="0" id="tblOperator" runat="server">
        <tr>
            <td class="ToolMenu" id="tdstart" runat="server">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <asp:LinkButton runat="server" ID="btnStart" OnClick="btnSubmit_Click" OnClientClick="return check()">
                    <span><img src="../Images/Icon/Object/File-add.gif" /></span><span>提交</span></asp:LinkButton>
                </div>
            </td>
            <td class="Fg" id="tdstartfg" runat="server">
                <img src="../Images/FgLine.gif" alt="" />
            </td>
            <td class="ToolMenu" id="tdfinish" runat="server">
                <div class="Normal" oldclass="Normal" onmouseover="OverChangeClass(this);" onmouseout="ReturnClass(this)">
                    <asp:LinkButton runat="server" ID="btnFinish" OnClick="btnDelete_Click" OnClientClick="return window.confirm('确认删除?');">
                    <span><img src="../Images/Icon/Object/File-delete.gif" /></span><span>删除</span></asp:LinkButton>
                </div>
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="TitleContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="InfoContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="TextContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content6" ContentPlaceHolderID="TabberContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content7" ContentPlaceHolderID="Div1ContentPlaceHolder" runat="server">
    <div class="Section1" style='layout-grid: 23.05pt -1.15pt; mso-layout-grid-char-alt: -4697;
        text-align: center; margin: 0px;'>
        <div style="width: 1100px">
            <p align="center" style='text-align: center'>
                <span style='font-size: 18.0pt; font-family: 黑体;'>“三重一大”事项备案表<span><o:p></o:p></span></span></p>
            <p align="center" style='text-align: left; padding-left: 70px;'>
                <span>备案单位&nbsp;&nbsp;<asp:TextBox runat="server" ID="tbDept" Width="300" CssClass="TextboxLine"
                    MaxLength="50"></asp:TextBox></span>
            </p>
            <table cellspacing="0" width="1024" cellpadding="0" id="tbl" style='border-collapse: collapse;
                border: none;'>
                <tr>
                    <td width="60" rowspan="2" style="border-top: none; border-bottom: none; border-left: none;">
                        <%if (CanAdd == "0")
                          { %>
                        <input type="button" class="Button01" onclick="addNew2()" value="增加" /><%}
                          { %>&nbsp;
                        <%} %>
                    </td>
                    <td width="34" rowspan="2" valign="top" style='border: solid windowtext 1.0pt;' align="center">
                        <p>
                            <span>&nbsp; </span>
                        </p>
                        <p>
                            <span>序</span>
                        </p>
                        <p>
                            <span>号</span>
                        </p>
                    </td>
                    <td width="300" rowspan="2" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            <span>&nbsp; </span>
                        </p>
                        <p align="center" style='text-align: center'>
                            <span>事项名称</span>
                        </p>
                    </td>
                    <td width="200" colspan="4" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            <span>事项性质</span>
                        </p>
                    </td>
                    <td width="90" rowspan="2" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            &nbsp;
                        </p>
                        <p align="center" style='text-align: center'>
                            <span>决策时间</span>
                        </p>
                    </td>
                    <td width="100" colspan="2" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            <span>讨论情况</span>
                        </p>
                    </td>
                    <td width="200" colspan="4" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            <span>执行情况</span>
                        </p>
                    </td>
                    <td width="100" rowspan="2" valign="top" style='border: solid windowtext 1.0pt; border-left: none;'>
                        <p align="center" style='text-align: center'>
                            <span>&nbsp; </span>
                        </p>
                        <p align="center" style='text-align: center'>
                            <span>备注</span>
                        </p>
                    </td>
                </tr>
                <tr id="tr2">
                    <td width="50" valign="top" style='width: 41.55pt; border-top: none; border-left: none;
                        border-bottom: solid windowtext 1.0pt; border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>重大决策</span>
                        </p>
                    </td>
                    <td width="50" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>重要人事调整</span>
                        </p>
                    </td>
                    <td width="50" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>重大项目安排</span>
                        </p>
                    </td>
                    <td width="50" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>大额资金使用</span>
                        </p>
                    </td>
                    <td width="50" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>一致通过</span>
                        </p>
                    </td>
                    <td width="50" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p align="center" style='text-align: center'>
                            <span>少数服从多数</span>
                        </p>
                    </td>
                    <td width="40" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p>
                            <span>已执行</span>
                        </p>
                    </td>
                    <td width="40" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p>
                            <span>执行中</span>
                        </p>
                    </td>
                    <td width="40" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p>
                            <span>未执行</span>
                        </p>
                    </td>
                    <td width="80" valign="top" style='border-top: none; border-left: none; border-bottom: solid windowtext 1.0pt;
                        border-right: solid windowtext 1.0pt;'>
                        <p>
                            <span>变更决策</span>
                        </p>
                    </td>
                </tr>
            </table>
            <p>
                <span style='font-size: 14.0pt; float: left; padding-left: 70px;'>领导签名<asp:TextBox
                    runat="server" ID="tbSign" Width="120" CssClass="TextboxLine" MaxLength="30"></asp:TextBox></span><span
                        style='float: right'>填表日期 <span>
                            <asp:TextBox runat="server" ID="tbYear" Width="60" CssClass="TextboxLine" MaxLength="6"></asp:TextBox>年</span><span
                                style='font-size: 14.0pt;'>
                                <asp:TextBox runat="server" ID="tbMonth" Width="40" CssClass="TextboxLine" MaxLength="3"></asp:TextBox>月</span><span><asp:TextBox
                                    runat="server" ID="tbDay" Width="40" CssClass="TextboxLine" MaxLength="3"></asp:TextBox>日</span></span></p>
        </div>
    </div>
    <table id="template1" style="display: none">
        <tr name="template1">
            <td style="border-top: none; border-bottom: none; border-left: none;">
                <%if (CanAdd == "0")
                  { %>
                <input type="button" class="Button01" onclick="deleteTr(this)" value="删除" /><%} %>
            </td>
            <td style='border: solid windowtext 1.0pt;' align="center">
                t0
            </td>
            <td style='border: solid windowtext 1.0pt;'>
                <input type="text" id="t02" name="t02" class="TextboxLine" style="width: 280px" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t03" name="t03" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t04" name="t04" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t05" name="t05" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t06" name="t06" />
            </td>
            <td style='border: solid windowtext 1.0pt;'>
                <input type="text" id="t07" name="t07" class="TextboxLine" style="width: 85px" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t08" name="t08" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t09" name="t09" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t010" name="t010" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t011" name="t011" />
            </td>
            <td align="center" style='border: solid windowtext 1.0pt;'>
                <input type="checkbox" id="t012" name="t012" />
            </td>
            <td style='border: solid windowtext 1.0pt;'>
                <input type="text" id="t013" name="t013" class="TextboxLine" style="width: 75px" />
            </td>
            <td style='border: solid windowtext 1.0pt;'>
                <input type="text" id="t014" name="t014" class="TextboxLine" style="width: 95px" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="Div2ContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content9" ContentPlaceHolderID="Div3ContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content10" ContentPlaceHolderID="Div4ContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content11" ContentPlaceHolderID="Div5ContentPlaceHolder" runat="server">
</asp:Content>
<asp:Content ID="Content12" ContentPlaceHolderID="TabberJSContentPlaceHolder" runat="server">
</asp:Content>
